#!/bin/bash
echo "check emby servser status......"

emby_status=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:8096/system/info/public)
if [ $emby_status -eq 200 ]; then
    echo "Emby Server is running."
    break
else
    echo "Emby Server is not running. start services..."
    systemctl start pkgctl-EmbyServer;
    sleep 5
fi




##curl -k https://gitee.com/team_space/mynet_info/raw/master/emby_check.sh|bash